<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //控制台输出10个hello world

        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");
        // console.log("hello world");

        function CalSum(endNum) {
            var n = 1;

            var sum = 0;
            //1+2+3+...+100
            while (true) {

                console.log("sum=" + sum + "+" + n);
                sum = sum + n;


                //console.log("hello world " + n);
                n++;

                if (n >= endNum) {
                    break; //退出当前循环体
                    continue; //退出本次循环
                }

            }

            return sum;


        }

        var r = CalSum(10);


        function Add(a, b) {
            var s = a + b;
            return s;
        }


        // var c = a + b;



        var myarray = new Array();
        var emptyArray = [1, 2];
        var strArray = ["I", "am", "me"];

        for (let i = 0; i < strArray.length; i++) {
            console.log(emptyArray[i]);
        }


    </script>
</body>

</html>